<!DOCTYPE html>
<html>
	<head>
		<title><?php echo $title;?></title>
		<?php echo link_tag('css/ppharm_master.css'.'?'.time());?>
		<?php echo link_tag('css/footer.css'.'?'.time());?>
		<?php echo link_tag('css/header.css'.'?'.time());?>
		<?php echo link_tag('css/menu.css'.'?'.time());?>
		<?php echo link_tag('css/grid.css'.'?'.time());?>
		<?php echo link_tag('css/ppharm.css'.'?'.time());?>
		<?php echo link_tag('css/custom-theme/jquery-ui-1.8.2.custom.css'.'?'.time());?>
		 
		
		<script type="text/javascript" src="<?php echo base_url().('/js/jquery.min.js');?>"></script>
		<script type="text/javascript" src="<?php echo base_url().('/js/jquery-ui.min.js');?>"></script>
		<script type="text/javascript">

		$(document).ready(function() {
						
			jQuery('#navigation').accordion({ 
						active: false, 
						header: '.head', 
						navigation: true, 
						event: 'mouseover', 
						fillSpace: true, 
						animated: 'easeslide',
						icons: false,
						autoHeight: true
			});


			<?php if ($this->ion_auth->is_admin()): ?>
			
			 $('#_facilityList').change(function(){
				 var confirmMessage = "You are about to change to facilities.\nClick ok to confirm this action.";
					if (!confirm(confirmMessage))
						return false;

					 window.location.replace('<?php echo base_url().'index.php/welcome/change_facility/'?>' + $('#_facilityList').val());
		 		});
			<?php endif; ?>

				 <?php	//The php var below contains javascript loaded and used from the calling controller
								echo isset($additional_javascript_doc_ready_functions) ? $additional_javascript_doc_ready_functions : '' ; ?>							 
				 }	
		);//End of document ready

			<?php //The php var below contains additional javascript functions created in calling controller
						echo isset($additional_jquery_javascript) ? $additional_jquery_javascript : ''; ?>
	
		
	</script>
		
	</head>

	<body>
	<table cellspacing="0" cellpadding="0" style="height: 100%; table-layout: fixed;" class="MenuTable">
		<colgroup>
			<col width="152">
			<col width="*">
		</colgroup>
	<tbody>
	<tr>
	<td height="75px" colspan="2">
		<div class="headerRow">
			<?php $this->load->view('header_view'); ?>
		</div>
	</tr>
	
	<tr>
		<td>
		 <div >
			<?php $this->load->view('nav_view'); ?>
			</div>
		</td>
		<td>
		<noscript><center><div class="error"><h1>Javascript is required for this site to function properly.</h1></div></center></noscript>
			<?php
					if(isset($view))
					{
					 echo "<div class=\"content-area\">";
					 	echo "<div class=\"error\">";
					 		if	(isset($deleted_info))
					 		{
					 			foreach ($deleted_info as $info_msg)
					 				echo $info_msg.'<br>';
					 		} 
					 	echo "</div>";

					 	$this->load->view($view);
					echo "</div>";
					}
			?>
		</td>
	</tr>

	<tr>
		<td>
			<div class="footerrow">
				<?php $this->load->view('footer_view'); ?>
			</div>
		</td>
	</tr>	
	</tbody>
	</table>
	</body>
</html>